from django.urls import path,register_converter
from . import views

from .converters import boolConverter

register_converter(boolConverter, 'bool')

urlpatterns = [
    path('create_community/',views.CommunityView.as_view(),name='create_community'),  # 发布动态
    path('get_usercommunity/',views.user_CommunityListView.as_view(),name='get_usercommunity'),  # 获取用户自己动态
    path('get_community/',views.CommunityListView.as_view(),name='get_community'),  # 获取所有动态
    path('delete_community/<int:pk>',views.CommunityDestroyView.as_view(),name='delete_community'),  # 用户删除自己的动态
    path('give_likeadd/<int:pk>/<str:orlike>',views.givelikeView.as_view(),name='give_likeadd'),
    path('create_Comments/',views.user_Comments,name='create_Comments'),
]